<?php
namespace app\index\controller;

use EasyWeChat\Factory;
use think\Controller;

class Index extends Base
{
    public function index()
    {
        return $this->fetch();
    }
    public function ce(){
        $app = Factory::officialAccount(config('wxconfig'));
        $buttons=[
        		[
                "type" => "view",
                "name" => "我要下单",
                "url"  => "http://wnxlg.zytec.top"
            ]
        	]
        ;
        $res=$app->menu->create($buttons);
        halt($res);
    }
    public function tui(){

        $result = $this->wxpay->refund->byOutTradeNumber('1598252107', '1598252107', 150, 150, [
            // 可在此处传入其他参数，详细参数见微信支付文档
            'refund_desc' => '退款',
        ]);
        halt($result);
    }

}
